package com.cctv.video.base;

import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.content.Intent;
import ohos.app.Context;

public abstract class BaseAbilitySlice extends AbilitySlice {
    private Context mContext;

    @Override
    protected void onStart(Intent intent) {
        super.onStart(intent);
        mContext = this;

        super.setUIContent(getUIContent());

        this.initData();
    }

    /**
     * 获取布局ID
     *
     * @return
     */
    protected abstract int getUIContent();

    /**
     * 数据初始化
     *
     * @return
     */
    protected abstract void initData();
}
